import os

class AppConfig:
    # 服务配置
    HOST = os.getenv('SERVICE_HOST', '0.0.0.0')
    PORT = int(os.getenv('SERVICE_PORT', 7860))
    WORKERS = int(os.getenv('SERVICE_WORKERS', 1))
    
    # 模型配置
    MODEL_PATH = os.getenv('MODEL_PATH', '/mnt/ljf/SDDEMO/lora_weight/newsworld.safetensors')
    DEVICE = os.getenv('DEVICE', 'cuda')
    
    # 图像处理配置
    MAX_IMAGE_SIZE = int(os.getenv('MAX_IMAGE_SIZE', 1024 * 1024 * 5))  # 5MB
    ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}
    
    # 性能配置
    BATCH_SIZE = int(os.getenv('BATCH_SIZE', 1))
    TIMEOUT = int(os.getenv('TIMEOUT', 30))  # 秒 